package com.hopu.springboot2025070801.controller;

import com.hopu.springboot2025070801.bean.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.List;

@Controller
public class UserController {

    ArrayList<User> users = new ArrayList<>();

    @RequestMapping("/register")
    @ResponseBody
    public ArrayList<User> registerPage(User user) {
        users.add(user);
        System.out.println(users);
        return users;
    }

}
